package com.supreme.cacheserver.component;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.stereotype.Component;

@Component
public class BeanFactoryUtils implements BeanFactoryAware {

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        System.out.println("==================================================");
        if (beanFactory.containsBean("beanFactory")) {
            System.out.println("beanFactory");
        }
        if (beanFactory.containsBean("redisTemplate")) {
            System.out.println("redisTemplate");
        }
        if (beanFactory.containsBean("stringRedisTemplate")) {
            System.out.println("stringRedisTemplate");
        }
        System.out.println("==================================================");
    }
}
